<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
           uri="/WEB-INF/tags/shiro.tld"%>
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%
    Object lang=session.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
    String languageCode="zh_CN";
    if(lang!=null){
        languageCode=lang.toString();
    }
    Locale locale =SessionHelper.getLocaleByUser(request);
%>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>参考模板维护</title>
    <base href="<%=ViewUtil.getRequestPath(request)%>">
    <jsp:include
            page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtablemanager/table_templet_manager.js"></script>
    <jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
    <script type="text/javascript"
            src="avicit/cbb/techclass/tabledefine/commtablemanager/locale/language_<%=languageCode%>.js"></script>
    <script type="text/javascript">
        var sysId = "${sysId}";//系统标识
        var tableName = "${tableName}";//节点名称
        //设置高度
        function getScreenWidth(){
            return window.document.body.offsetWidth -300;
        }
        var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
        var dialogId = "${dialogId}"; //打开页面传递的模块ID
        var copyNodeData = "${copyNodeData}"; //父页面传递过来的库结构树 数据 视图
        var nodeId = "${nodeId}";
        //此事件必须放在jsp中,不能提取到js中,否则不能加载数据
        $(function() {
            $('#addTempField').hide();
            $('#saveTempField').hide();
            $('#deleteTempField').hide();
            $('#copyField').hide();
            $('#export').hide();
            $('#importExcel').hide();
            $('#exportExcelMoudle').hide();
            $('#configField').hide();

            $('#searchField').hide();
            $('#appendCode').hide();
            $('#saveCode').hide();
            $('#deleteWcode').hide();
            $('#selectCode').hide();
            document.getElementById("muAdd").style.display = 'none';
            document.getElementById("muEdit").style.display = 'none';
            document.getElementById("muRemove").style.display = 'none';
            //加载分类树
            reloadCommTempletInfoTree();
            loadDemoTree();
        });
    </script>
    <style type="text/css">
        .textbox {
            border: solid 1px #a5acb5;
        }

        .input,img {
            vertical-align: middle;
        }

        <!--
        实现input和img水平对齐 -->.labelbg {
                               background:
                                       url('../../js/jQuery/jquery-easyui-1.3.5/themes/icons/required.gif')
                                       right 0 no-repeat;
                           }
    </style>
</head>
<body id="myBody" class="easyui-layout">
<div
        data-options="region:'west',title:'',split:false,border:false,collapsible:false"
        style="width: 220px; height: 0; font-size: 0;">
    <!-- 参考模板树 -->
    <ul id="commTempletInfoTree" class="easyui-tree"></ul>
    <div id="mm" class="easyui-menu" style="width: 120px;">
        <sec:accesscontrollist hasPermission="3"
                               domainObject="commtablemanager_table_templet_manager_button_addForm">
            <div onclick="addForm()" data-options="iconCls:'icon-im-add'"
                 id="muAdd"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add","i18n.lantop",locale)%></div><%--添加 --%>
        </sec:accesscontrollist>
        <sec:accesscontrollist hasPermission="3"
                               domainObject="commtablemanager_table_templet_manager_button_editForm">
            <div onclick="editForm()" data-options="iconCls:'icon-im-edit'"
                 id="muEdit"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.edit","i18n.lantop",locale)%></div><%--编辑 --%>
        </sec:accesscontrollist>
        <sec:accesscontrollist hasPermission="3"
                               domainObject="commtablemanager_table_templet_manager_button_deleteForm">
            <div onclick="deleteForm()" data-options="iconCls:'icon-im-remove'"
                 id="muRemove"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.delete","i18n.lantop",locale)%></div><%--删除--%>
        </sec:accesscontrollist>
        <sec:accesscontrollist hasPermission="3"
                               domainObject="commtablemanager_table_templet_manager_button_backButton">
            <a id="backButton" class="easyui-linkbutton"
               data-options="iconCls:'icon-im-back', plain : true"
               onclick="closeWindow();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.edit.return","i18n.lantop",locale)%></a><%--返回--%>
        </sec:accesscontrollist>
    </div>
    <!-- 库结构定义树 -->
    <ul id="classTree" class="easyui-tree"></ul>
</div>
<div data-options="region:'center'"
     style="height: 0; overflow: hidden; font-size: 0;">
    <div class="easyui-layout" data-options="fit:true">
        <%--基础字段表 --%>
        <div data-options="region:'center',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable","i18n.lantop",locale)%>'" id="tgrid"
             style="height: 0; font-size: 0;">
            <div id="tb">
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_addField">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-add"
                       onclick="append();" href="javascript:void(0);" id="addTempField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.addField","i18n.lantop",locale)%></a><%--添加字段 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_deleteField">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-remove"
                       onclick="deleteDetailForm();" href="javascript:void(0);"
                       id="deleteTempField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.deleteField","i18n.lantop",locale)%></a><%--删除字段 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_saveField">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-save"
                       onclick="accept();" href="javascript:void(0);" id="saveTempField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.save","i18n.lantop",locale)%></a><%--保存 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_searchField">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-search"
                       onclick="searchField();" href="javascript:void(0);"
                       id="searchField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.search","i18n.lantop",locale)%></a><%--查询 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_copyFieldForm">
                    <td width="90px"><a class="easyui-linkbutton" plain="true"
                                        iconCls="icon-im-copy" onclick="copyField();"
                                        href="javascript:void(0);" id="copyField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.copy","i18n.lantop",locale)%></a></td><%--复制 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_export">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-export"
                       onclick="exportData();" href="javascript:void(0);" id="export"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.exportConstructionData","i18n.lantop",locale)%></a><%--导出结构数据 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_importExcel">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-import"
                       onclick="openImportDialog();" href="javascript:void(0);"
                       id="importExcel"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.importConstructionData","i18n.lantop",locale)%></a><%--导入结构数据 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_exportExcelMoudle">
                    <a class="easyui-linkbutton" plain="true"
                       iconCls="icon-im-newndownload" onclick="exportExcelMoudle();"
                       href="javascript:void(0);" id="exportExcelMoudle"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.downloadConstructionTemplate","i18n.lantop",locale)%></a><%--下载结构模板 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_config">
                    <a class="easyui-linkbutton" plain="true"
                       iconCls="icon-im-newinitfield" onclick="config();"
                       href="javascript:void(0);" id="configField"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain","i18n.lantop",locale)%></a><%--初始字段维护 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_backButton">
                    <a id="backButton" class="easyui-linkbutton"
                       data-options="iconCls:'icon-im-back', plain : true"
                       onclick="closeWindow();" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.edit.return","i18n.lantop",locale)%></a><%--返回 --%>
                </sec:accesscontrollist>
            </div>
            <table id="commTempletFieldDataGrid" class="easyui-datagrid"
                   data-options="
				rownumbers: true,
				animate: true,
				collapsible: false,
				fitColumns: false,
				autoRowHeight: false,
				singleSelect: true,
				pagination:true,
				pageSize:100,
				pageList:[100,150,200],
	    		striped:true,
				fit:true,
				method: 'post',
				toolbar: '#tb',
				sortName : 'colOrder',
				sortOrder: 'asc',
				remoteSort : false,
				checkOnSelect:false,
				selectOnCheck:false,
				onLoadSuccess : onLoadSuccessData,
				onClickCell:onClickCell
			">
                <thead>
                <tr>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_id">
                        <th data-options="field:'id', halign:'center',checkbox:true"
                            title="主键ID" width="20">主键ID</th><%--主键ID --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colLabel">
                        <th
                                data-options="field:'colLabel', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,validType:'length[0,20]'}}"
                                width="100" title="字段中文名"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.search.fieldCHNName","i18n.lantop",locale)%></th><%--字段中文名--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colName">
                        <th
                                data-options="field:'colName', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{required:true,validType:'length[0,30]'}}"
                                width="100" title="字段名"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填">
                            <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.search.fieldName","i18n.lantop",locale)%></th><%-- 字段名--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colType">
                        <th
                                data-options="field:'colType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{onSelect : typeSelect,onHidePanel: typeOnHidePanel,required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'string',lookupName:'字符串'},{lookupCode:'integer',lookupName:'整型'},{lookupCode:'date',lookupName:'日期时间型'},{lookupCode:'float',lookupName:'浮点型'},{lookupCode:'blob',lookupName:'BLOB'},{lookupCode:'clob',lookupName:'CLOB'}],editable:false}},formatter:fomaterColType"
                                width="100" title="字段类型"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.fieldType","i18n.lantop",locale)%></th><%--字段类型 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colLength">
                        <th
                                data-options="field:'colLength', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,5]'}}"
                                width="100" title="长度"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.length","i18n.lantop",locale)%></th><%--长度 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colDecimal">
                        <th
                                data-options="field:'colDecimal', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[1,6]'}}"
                                width="100" title="小数位数"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.decimalNum","i18n.lantop",locale)%></th><%--小数位数 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsSys">
                        <th
                                data-options="field:'colIsSys', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsSys"
                                width="100" title="系统字段"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.systemField","i18n.lantop",locale)%></th><%--系统字段 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsDisplay">
                        <th
                                data-options="field:'colIsDisplay', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsShow"
                                width="100" title="是否可见"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isVisible","i18n.lantop",locale)%></th><%--是否可见 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsMust', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsMust"
                                width="100" title="是否必著"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isMustRecord","i18n.lantop",locale)%></th><%-- 是否必著--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsVisible"
                                width="100" title="是否显示（添加/编辑）"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isShow(add/edit)","i18n.lantop",locale)%></th><%-- 是否显示（添加/编辑）--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsEdit', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsEdit"
                                width="100" title="是否编辑（添加/编辑）"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isEdit(add/edit)","i18n.lantop",locale)%></th><%--是否编辑（添加/编辑） --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsTabVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsTabVisible"
                                width="100" title="表格显示"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.tableShow","i18n.lantop",locale)%></th><%--表格显示 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsDetail', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsDetail"
                                width="100" title="详细显示"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.detailShow","i18n.lantop",locale)%></th><%--详细显示 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colIsSearch', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsSearch"
                                width="100" title="查询字段"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.searchField","i18n.lantop",locale)%></th><%-- 查询字段--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
                        <th
                                data-options="field:'colDropdownType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,50]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'0',lookupName:'无'},{lookupCode:'1',lookupName:'参选'},{lookupCode:'2',lookupName:'只选'},{lookupCode:'3',lookupName:'选择'}],editable:false,onSelect:onSelectCom,onHidePanel: selectTypeOnHidePanel}},formatter:fomaterType"
                                width="100" title="下拉类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.type","i18n.lantop",locale)%></th><%--类型 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colRuleTitle">
                        <th
                                data-options="field:'colRuleTitle', halign:'center', align:'center', sortable:false, editor:{type:'text'}"
                                width="100" title="顺序"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.createRule","i18n.lantop",locale)%></th><%--生成规则 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colRuleName">
                        <th
                                data-options="field:'colRuleName',halign:'center', align:'center', editor:{type:'text'},hidden:true"
                                width="100" title="生成规则英文"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.createEnglishRule","i18n.lantop",locale)%></th><%--生成规则英文 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_customPath">
                        <th
                                data-options="field:'customPath',halign:'center', align:'center', editor:{type:'text'},hidden:true"
                                width="100" title="路径"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.path","i18n.lantop",locale)%></th><%--路径 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_colOrder">
                        <th
                                data-options="field:'colOrder', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,4]'}}"
                                width="100" title="顺序"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.order","i18n.lantop",locale)%></th><%--顺序 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_remark">
                        <th
                                data-options="field:'remark', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{'validType':'length[0,200]'}}"
                                width="100" title="备注"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.comment","i18n.lantop",locale)%></th><%--备注 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtempletmanager_comm_templet_manager_datagrid_isNew">
                        <th
                                data-options="field:'isNew', halign:'center', align:'center',hidden: true,editor:{type:'text'}"
                                width="100" title="是否新建"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table.button.ifCreate","i18n.lantop",locale)%></th><%--是否新建 --%>
                    </sec:accesscontrollist>
                </tr>
                </thead>
            </table>
        </div>
        <div data-options="region:'east',title:'<%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable","i18n.lantop",locale)%>'"
             style="height: 0; overflow: hidden; font-size: 0;" id="codeDataDiv">
            <script type="text/javascript">
                //在此给div定义宽度（当easyui解析到该div时才能将宽度加上去）
                $("#codeDataDiv").css("width",
                    ($(window).width() - 200) * 0.5 + "px");
            </script>
            <div id="tb2">
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_appendCode">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-add"
                       onclick="appendCode();" href="javascript:void(0);"
                       id="appendCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add","i18n.lantop",locale)%></a><%--添加 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_saveCode">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-save"
                       onclick="saveCode();" href="javascript:void(0);" id="saveCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.save","i18n.lantop",locale)%></a><%--保存 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_deleteWcode">
                    <a class="easyui-linkbutton" plain="true" iconCls="icon-im-remove"
                       onclick="deleteWcode();" href="javascript:void(0);"
                       id="deleteWcode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.delete","i18n.lantop",locale)%></a><%--删除 --%>
                </sec:accesscontrollist>
                <sec:accesscontrollist hasPermission="3"
                                       domainObject="commtablemanager_table_templet_manager_button_selectCode">
                    <a class="easyui-linkbutton" plain="true"
                       iconCls="icon-im-newinsert" onclick="selectCode();"
                       href="javascript:void(0);" id="selectCode"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.button.quote","i18n.lantop",locale)%></a><%--引用 --%>
                </sec:accesscontrollist>
            </div>
            <table id="commTempletCodeDataGrid" class="easyui-datagrid"
                   data-options="
								rownumbers: true,
								animate: true,
								collapsible: false,
								fitColumns: true,
								autoRowHeight: false,
								singleSelect: true,
								selectOnCheck : false,
								checkOnSelect : false,
								pagination:true,
								pageSize:100,
								pageList:[100,150,200],
					    		striped:true,
								fit:true,
								method: 'post',
								sortName : 'CODE_ORDER',
								sortOrder: 'asc',
								toolbar: '#tb2',
								remoteSort: false,
								onClickRow : onClickRowCode,
								url: 'platform/aos/commtempletmanagerController/getCommTempletCodeData.json'
						">
                <thead>
                <tr>

                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_ID">
                        <th data-options="field:'ID', halign:'center',checkbox:true"
                            title="主键ID" width="20">主键ID</th><%--主键ID --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_CODE_ORDER">
                        <th
                                data-options="field:'CODE_ORDER', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{required:true,'validType':'length[0,10]'}}"
                                width="100" title="顺序"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.order","i18n.lantop",locale)%></th><%--顺序 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_LOOKUP_NAME">
                        <th
                                data-options="field:'LOOKUP_NAME', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
                                width="100" title="显示值"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.showValue","i18n.lantop",locale)%></th><%--显示值 --%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_LOOKUP_CODE">
                        <th
                                data-options="field:'LOOKUP_CODE', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
                                width="100" title="真实值"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.trueValue","i18n.lantop",locale)%></th><%--真实值--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_CODE_IS_VALID">
                        <th
                                data-options="field:'CODE_IS_VALID', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,4]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'Y',lookupName:'有效'},{lookupCode:'N',lookupName:'无效'}],editable:false}},formatter:fomaterVa"
                                width="100" title="否有效"><img
                                src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.iseffective","i18n.lantop",locale)%></th><%--是否有效--%>
                    </sec:accesscontrollist>
                    <sec:accesscontrollist hasPermission="3"
                                           domainObject="commtablemanager_table_templet_manager_datagrid_CTYPE">
                        <th
                                data-options="field:'CTYPE', halign:'center', align:'center', sortable:false,formatter:fomaterCType"
                                width="100" title="类型"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain.table2.type","i18n.lantop",locale)%></th><%--类型--%>
                    </sec:accesscontrollist>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>
</body>
</html>
